package com.wzj.yygh.hosp.controller.inner;

import com.wzj.yygh.hosp.service.ScheduleService;
import com.wzj.yygh.model.hosp.Schedule;
import com.wzj.yygh.vo.hosp.ScheduleOrderVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "医院接口-供其他微服务远程调用")
@RestController
@RequestMapping("/inner/hosp/hospital")
public class InnerScheduleController {
    @Autowired
    private ScheduleService scheduleService;

    @ApiOperation("根据id获取预约下单数据")
    @GetMapping("getScheduleOrderVo/{scheduleId}")
    public ScheduleOrderVo getScheduleOrderVo(@PathVariable String scheduleId) {
        return scheduleService.getScheduleOrderVo(scheduleId);
    }

    @ApiOperation("根据id获取预约信息")
    @PostMapping("inner/hosp/hospital/updateSchedule")
    public void updateScheduleById(@RequestBody Schedule schedule){
        scheduleService.updateByHosScheduleId(schedule);
    }

//    @ApiOperation("根据id获取预约信息")
//    @GetMapping("inner/hosp/hospital/getSchedule/{scheduleId}")
//    public Schedule getScheduleById(@PathVariable String scheduleId){
//        return scheduleService.getScheduleById(scheduleId);
//    }
}
